# $Id: PKGBUILD 66262 2012-02-23 05:34:27Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>

pkgname=osec
pkgver=1.2.3
pkgrel=2
pkgdesc="lightweight integrity checking system"
arch=(i686 x86_64)
url="http://o-security.sourceforge.net/"
license=("GPL")
makedepends=(help2man tinycdb)
depends=(cdbxx libcap openssl perl)
install=osec.install
backup=(etc/osec/dirs.conf
	etc/osec/pipe.conf)
source=(https://downloads.sourceforge.net/project/o-security/o-security/$pkgver/osec-$pkgver.tar.gz)
md5sums=('b7f3612e58c7b0ff379a8ee6b79c725c')

build() {
  cd $srcdir/$pkgname-$pkgver
  ./configure --prefix=/usr --sysconfdir=/etc/osec
  make
  make DESTDIR=$pkgdir install
  mv $pkgdir/usr/share/pipe.conf $pkgdir/etc/osec/pipe.conf
  mkdir -p $pkgdir/usr/share/osec
  mv $pkgdir/usr/share/osec.cron $pkgdir/usr/share/osec/
  install -d -m 0755 $pkgdir/var/lib/osec
}
